// questionTypes.js - 题目类型路由
const express = require('express');
const router = express.Router();
const { 
  getQuestionTypes,
  createQuestionType,
  updateQuestionType,
  deleteQuestionType,
  getQuestionTypeById,
  searchQuestionTypes
} = require('../controllers/questionTypeController');

// 题目类型集合路由
router.route('/')
  .get(getQuestionTypes)
  .post(createQuestionType);

// 题目类型搜索路由
router.route('/search')
  .get(searchQuestionTypes);

// 单个题目类型操作路由
router.route('/:id')
  .get(getQuestionTypeById)
  .put(updateQuestionType)
  .delete(deleteQuestionType);

module.exports = router;
